%% analysis saliency study - create event list for assign EEG trials the correct label

clear
dir(mfilename('fullpath')) %if matlab file is in same folder as VAS data

S_num= input('which participant do you want to analyze?');
fstruct = dir(['*S', num2str(S_num),'*VAS*.mat']);

load(fstruct.name, "trial_order");
events_name= string();
A = transpose(trial_order);
events_num= reshape(A,[],1);

for q = 1: size(events_num)

  if strcmp(events_num(q,1),'highOddball')
     events_name(q,1)='High Oddball';

  else 
         events_name(q,1)='Low Oddball';
  end
end

events_name = char(events_name); %copy list of events and paste it into the 
                                 % exported trial list from letswave. 
                                 % Import back to Letswave